<?php
/**
 * 小程序添加跟进
 */
namespace app\mini\controller;
class Inform extends Pre
{
    //添加，修改
    public function lists(){
        $findMap[] = ['date','elt',time()];
        $info = \app\common\model\Inform::where($findMap)->order('date desc')->select()->toarray();
        foreach ($info as $k => $value){
            $info[$k]['date'] = date('Y-m-d H:i:s',$value['date']);
        }

        $loginInfo = $this -> loginInfo;
        cache('readNum'.$loginInfo['id'],array_column($info,'id'),3600*24*365);
        return [
            'num' => count($info),
            'content' => $info
        ];

    }

}